package com.wc5818;

import com.wc5818.common.WxMappingJackson2HttpMessageConverter;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/***
 * @Author:yqb
 * @Date: 2020/01/09
 * @Time: 15:20
 *
 */
@MapperScan("com.wc5818") // 扫描的mapper
@SpringBootApplication
public class WCApplication {

	public static void main(String[] args) {
		SpringApplication.run(WCApplication.class, args);
	}

	@Bean
	RestTemplate restTemplate() {
		RestTemplate restTemplate = new RestTemplate();
		restTemplate.getMessageConverters().add(new WxMappingJackson2HttpMessageConverter());
		return restTemplate;

	}
}
